---
title: "Dictionary analysis"
author: "Kohei Watanabe"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output: html_document
---

```{r, message=FALSE}
knitr::opts_chunk$set(echo = TRUE, dpi = 150, fig.height=4, fig.width=10)
load("matrix_dictionary.RDA")
mt_ideo <- kernapply(mt_ideo, kernel("daniell", c(1, 1)))
mt_tech <- kernapply(mt_tech, kernel("daniell", c(1, 1)))
```

```{r}
par(mar = c(2, 4, 2, 2))
matplot(rownames(mt_ideo[,1:4]), mt_ideo[,1:4], type = "l", col = 1, xaxt = "n", ylim = c(0, 1), 
        lty = seq_len(ncol(mt_ideo[,1:4])), xlim = c(1860, 2020), ylab = "Relative frequency")
legend("topleft", colnames(mt_ideo[,1:4]), col = 1, lty = seq_len(ncol(mt_ideo[,1:4])))
axis(1, seq(1860, 2020, by = 10))
```

```{r}
par(mar = c(2, 4, 2, 2))
matplot(rownames(mt_ideo[,5:6]), mt_ideo[,5:6], type = "l", col = 1, xaxt = "n", ylim = c(0, 1), 
        lty = seq_len(ncol(mt_ideo[,5:6])), xlim = c(1860, 2020), ylab = "Relative frequency")
legend("topleft", colnames(mt_ideo[,5:6]), col = 1, lty = seq_len(ncol(mt_ideo[,5:6])))
axis(1, seq(1860, 2020, by = 10))
```

```{r}
par(mar = c(2, 4, 2, 2))
matplot(rownames(mt_tech), mt_tech, type = "l", col = 1, xaxt = "n", ylim = c(0, 1), 
        lty = seq_len(ncol(mt_tech)), xlim = c(1860, 2020), ylab = "Relative frequency")
legend("topleft", colnames(mt_tech), col = 1, lty = seq_len(ncol(mt_tech)))
axis(1, seq(1860, 2020, by = 10))
```
